// Time Tracker by Eric Nadeau (nado18@gmail.com)
// Copyright (C) 2007 by Eric Nadeau
// Distributed under the terms of the GNU General Public License (see GPL.txt)

import javax.swing.*;

import view.*;

/**
 * @author Eric Nadeau (nado18@gmail.com), on Apr 21, 2004
 */
public class TimeTracker {
	private MainWindow mw;
	
	public TimeTracker() {
		mw = new MainWindow();
	}
	
	public synchronized void mainLoop() {
		try {
			while(true) {
				mw.update();
				wait(500);	// Twice the wanted frequency...
			}
		}
		catch (InterruptedException e) {}
	}
	
	public static void main(String[] args) {
		try {
			UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
		}
		catch(Exception ex) {}
		
		new TimeTracker().mainLoop();
	}
}
